﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>" />
    <title>solcoo 对账表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="keywords" content="keyword1, keyword2, keyword3" />
    <meta http-equiv="description" content="solcoo 对账表" />
	<!--  css -->
    <link rel="stylesheet" href="css/jquery-ui.css" />
    <link href="css/main.css" type="text/css" rel="stylesheet" />
    <!-- js -->
    <script src="js/jquery-1.9.1.js" charset="UTF-8"></script>
    <script src="js/jquery-ui.js" charset="UTF-8"></script>
    <script type="text/javascript">
    	$(function() {
        	$(".jquery_ui_date_style").datepicker({dateFormat:"yy-mm-dd"});
        });
    </script>
  </head>
  <body>
  	<c:if test="${empty sessionScope.user}">
		<jsp:forward page="/" />
	</c:if>
    <div id="header_style">
    	<div class="quit"><a href="login.jsp">退出系统</a></div>
        <h1 id="logo"><img src="images/logo.png" alt="solcoo" /></h1>
    </div>
    <div id="main_content">
        <div id="content_header">
            <div class="block_box">
            	<h2 class="other_tab"><a href="queryVIP.jspDo?shanghuid=${shanghuid}">会员表</a></h2>
            	<h2 class="curret_tab"><a href="queryOrder.jspDo?merchantId=${shanghuid}">对账表</a></h2>
                <h2 class="other_tab"><a href="queryData.jspDo?yonghum=${shanghuid}">数据统计</a></h2>
                <cite class="right_info">(默认单位：元)</cite>
            </div>
        </div>
        <div id="content">
        	<img src="static/pic/report/data/近30天日实收款折线图.jpg" />
            <div class="table_search_box">
                <div class="filter_box">
                    <div class="filter_header_info">
                        <div class="filter_h_b_l_row">
                            <span>实收总额：${inTotal}</span>
                            <span>充值总额：${realInAmountTotal}</span>
                            <span>支付总额：${outTotal}</span>
                        </div>
                        <div class="filter_h_r_row">
                            <span class="">${startDateStr} ~ ${endDateStr}</span>
                        </div>
                    </div>
                    <div class="filter_form_info">
                        <form method="post" action="<%=request.getContextPath() %>/queryOrder.jspDo">
                            <fieldset>
                                <label>从<input class="jquery_ui_date_style" name="startDateStr" type="text" value="${startDateStr}" /></label>
                                <label>到<input class="jquery_ui_date_style" name="endDateStr" type="text" value="${endDateStr}" /></label>
                                <input type="hidden" name="merchantId" value="${shanghuid}"/>
                                <label>配送员: <input class="input_style" name="empname" type="text" value="${empname}" /></label>
                                <input class="filter_form_submit" type="submit" value="确定" />
                            </fieldset>
                        </form>
                    </div>
                </div>
                <div class="table_search_result">
                    <table class="tgy_ui_table" cellpadding="0" cellspacing="0" width="100%" align="center">
                        <tr align="center">
                            <th>日期</th>
                            <th>昵称</th>
                            <th>搜卡号</th>
                            <th>实收款</th>
                            <th>充值</th>
                            <th>支付</th>
                            <th>配送员</th>
                            <th>时间</th>
                        </tr>
                        <c:forEach var="order" items="${orders}" varStatus="orderStatus">
                            <c:set var="isIn"></c:set>
                            <c:set var="isOut"></c:set>
                            <c:choose>
                                <c:when test="${order.leixing eq 1}">
                                    <c:set var="isIn" value="true"></c:set>
                                </c:when>
                                <c:otherwise>
                                    <c:set var="isOut" value="true"></c:set>
                                </c:otherwise>
                            </c:choose>
                            <tr class="${orderStatus.first ? 'first ' : ''}${orderStatus.index%2==0 ? 'even ' : ''}${orderStatus.last ? 'last ' : ''}">
                                <td>${order.date}</td>
                                <td>${order.gerenName}</td>
                                <td>${order.gerenid}</td>
                                <td>${isIn eq 'true' ? order.jine : '0'}</td>
                                <td>${order.realInAmount}</td>
                                <td>${isOut eq 'true'? order.jine : '0'}</td>
                                <td>${order.empname}</td>
                                <td>${order.time}</td>
                            </tr>
                        </c:forEach>
                    </table>
                </div>
            </div>
        </div>
    </div>
  </body>
</html>